Skip to content

feat: add native physical operators and shared DAG runtime - #474

Open
zzylol wants to merge 1 commit into
split/462-c-summary-kernelsfrom
split/462-d-runtime
Open

zzylol wants to merge 1 commit into
split/462-c-summary-kernelsfrom
split/462-d-runtime

Conversation

@zzylol

@zzylol zzylol commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

Stacked on #473.

Part 3 of the #462 split.

Before this PR

After #473, the Planner has kernels but no way to execute a physical DAG. Every deployment implements relational operators, summary build/merge/readout and execution separately.

After this PR

One shared runtime executes a DAG:

  • plan, runtime and sources: physical DAGs, the RunContext, shared producers, isolated runs, bounded backpressure, cancellation, tracked memory reservations, and raw-source scans with a memory connector.
  • expressions and operators: projection, filter, joins and semi-joins with certified pruning, aggregate/window, sort, limit, PromQL vector binary/window, temporal panes, current-series snapshots, and summary build, merge and readout.
  • Summary readout is typed. ReadoutQuery::Sketch(SketchQuery) reuses the logical IR's query. ReadoutQuery::Exact(ExactReadout { statistic, lookback_ms }) carries the logical counter window, which is resolved to the run's evaluation range at execution.
  • Operators derive serde, and deserialization validates their input/output contracts (operators/unchecked.rs). The byte format is left to the deployment.
  • readout::exact_readout: merge exact panes and read one population (None = absent).

Operators are built directly. No physical planner yet.

Notes

Validation: cargo test -p asap-physical-operators (55 passed) and cargo clippy --workspace --all-targets -D warnings.

Split stack: #472 (merged) · #473 · this PR · #475.

🤖 Generated with Claude Code

Add the execution layer of `asap-physical-operators`:

- `plan`, `runtime` and `sources`: physical DAGs, run context, bounded
  backpressure, cancellation, memory reservations and raw-source scans.
- `expressions` and `operators`: relational/scalar operators, windows,
  temporal panes, current-series snapshots, and summary build, merge and
  readout. A readout is typed: a `SketchQuery`, or an `ExactReadout` whose
  counter lookback resolves to the run's evaluation range. Deserialized
  operators are validated before use.
- `readout`: readouts over merged exact summary states.

There is no physical planner yet; operators are built directly.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@zzylol
zzylol force-pushed the split/462-c-summary-kernels branch from 83ccc49 to 4dc08e5 Compare September 30, 2026 18:26
@zzylol
zzylol force-pushed the split/462-d-runtime branch from f95ffd4 to fe80d7f Compare September 30, 2026 18:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant